// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-7-1

#ifndef __GAMEFILE_H_COMMON_NETMSG_
#define __GAMEFILE_H_COMMON_NETMSG_

#pragma once

#include <common\base\utility.h>

class CJoyGameInfo;
class CJoyLobbyInfo;
class CJoyLobbyGroupInfo;


//##ModelId=44CF17B10271
typedef CMap<CString, const CString&, CJoyGameInfo*, CJoyGameInfo*&> CJoyGameMap;
//##ModelId=44CF17B10273
typedef CMap<int, int, CJoyGameInfo*, CJoyGameInfo*&> CJoyGameTypeMap;
//##ModelId=44CF17B10280
typedef CMap<CString, const CString&, CJoyLobbyInfo*, CJoyLobbyInfo*&> CJoyLobbyMap;
//##ModelId=44CF17B10282
typedef CMap<int, int, CJoyLobbyInfo*, CJoyLobbyInfo*&> CJoyLobbyTypeMap;
//##ModelId=44CF17B10290
typedef CMap<CString, const CString&, CJoyLobbyGroupInfo*, CJoyLobbyGroupInfo*&> CJoyLobbyGroupMap;

//##ModelId=44CF17B10292
typedef CList<CJoyLobbyInfo>    CJoyLobbyList;
//##ModelId=44CF17B102A0
typedef CList<CJoyLobbyGroupInfo>   CJoyLobbyGroupList;
//##ModelId=44CF17B102A2
typedef CList<CJoyGameInfo>     CJoyGameList;

//##ModelId=44CF17B102B0
class CJoyGameInfo
{
public:
	//##ModelId=44CF17B102B1
    int     m_id;
	//##ModelId=44CF17B102B2
    CString m_name;
	//##ModelId=44CF17B102BF
    CString m_icon;
	//##ModelId=44CF17B102C0
    CString m_validExe;
};

//##ModelId=44CF17B102C1
class CJoyLobbyInfo
{
public:
	//##ModelId=44CF17B102CE
    int         m_id;
	//##ModelId=44CF17B102CF
    CString     m_name;
	//##ModelId=44CF17B102D0
    CString     m_title;
	//##ModelId=44CF17B102D1
    CString     m_helpNote;

	//##ModelId=44CF17B102D3
    CJoyGameInfo*   m_game;
	//##ModelId=44CF17B102DF
    CJoyLobbyGroupInfo* m_group;
};

//##ModelId=44CF17B102E3
class CJoyLobbyGroupInfo
{
public:
	//##ModelId=44CF17B102E4
    CString     m_name;
	//##ModelId=44CF17B102E5
    CString     m_title;

};


//##ModelId=44CF17B102EE
class CJoyGameFile
{
public:
	//##ModelId=44CF17B102F0
    CJoyGameMap         m_gameMap;
	//##ModelId=44CF17B102FE
    CJoyGameTypeMap     m_gameTypeMap;
	//##ModelId=44CF17B10303
    CJoyLobbyMap        m_lobbyMap;
	//##ModelId=44CF17B10308
    CJoyLobbyTypeMap    m_lobbyIdMap;

	//##ModelId=44CF17B10311
    CJoyGameList        m_games;
	//##ModelId=44CF17B10316
    CJoyLobbyList       m_lobbies;
	//##ModelId=44CF17B1031D
    CJoyLobbyGroupList  m_groups;
public:
	//##ModelId=44CF17B10321
    CJoyGameFile(void);
	//##ModelId=44CF17B10323
    virtual ~CJoyGameFile(void);

	//##ModelId=44CF17B1032C
    bool Load(PCSTR filePath);
};

#endif  // __GAMEFILE_H_COMMON_NETMSG_
